StEntryPrivate *priv = ST_ENTRY_PRIV (self);
gboolean hint_visible =
priv->hint_actor != NULL &&
- strcmp (clutter_text_get_text (CLUTTER_TEXT (priv->entry)), "") == 0 &&
- !HAS_FOCUS (priv->entry);
+ strcmp (clutter_text_get_text (CLUTTER_TEXT (priv->entry)), "") == 0;
if (priv->hint_actor)
g_object_set (priv->hint_actor, "visible", hint_visible, NULL);
clutter_text_focus_in_cb (ClutterText *text,
ClutterActor *actor)
{
- StEntry *entry = ST_ENTRY (actor);
-
- st_entry_update_hint_visibility (entry);
-
st_widget_add_style_pseudo_class (ST_WIDGET (actor), "focus");
clutter_text_set_cursor_visible (text, TRUE);
}
clutter_text_focus_out_cb (ClutterText *text,
ClutterActor *actor)
{
- StEntry *entry = ST_ENTRY (actor);
-
st_widget_remove_style_pseudo_class (ST_WIDGET (actor), "focus");
-
- st_entry_update_hint_visibility (entry);
-
clutter_text_set_cursor_visible (text, FALSE);
}
StEntry *entry = ST_ENTRY (user_data);
StEntryPrivate *priv = ST_ENTRY_PRIV (entry);
+ st_entry_update_hint_visibility (entry);
+
/* Since the text changed, force a regen of the shadow texture */
cogl_clear_object (&priv->text_shadow_material);
}
g_return_val_if_fail (ST_IS_ENTRY (entry), NULL);
priv = st_entry_get_instance_private (entry);
- if (priv->hint_actor != NULL && clutter_actor_is_visible (priv->hint_actor))
- return "";
- else
- return clutter_text_get_text (CLUTTER_TEXT (priv->entry));
+
+ return clutter_text_get_text (CLUTTER_TEXT (priv->entry));
}
/**
clutter_text_set_text (CLUTTER_TEXT (priv->entry), text);
- st_entry_update_hint_visibility (entry);
-
g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_TEXT]);
}